package string;

/**
 * boolean startWith(String s);
 * 判断当前字符串是否是以给定的字符串开始
 */
public class StartWithDemo {
    public static void main(String[] args) {
        String str = "thinking in java";//java编程思想
        boolean starts = str.startsWith("think");
        System.out.println(starts);
        boolean ends = str.endsWith(".png");
        System.out.println(ends);
    }
}
